/*
 * testButton.cpp
 *
 *  Created on: 25/09/2011
 *      Author: andrea
 */

/*
void Application::run(){
	bool quit = false;
	this->initialize();


    TestListener* listener = new TestListener();
    Button* button = new Button("prueba", listener, 450, 300);

	this->engine->drawSurface(button->getSurface(), button->getSurface()->getRectangle());
    this->engine->refreshScreen();

	Event event;
	Rectangle rect = button->getSurface()->getRectangleStruc();
	Uint16 x, y;

    while( quit == false ) {
    	if (this->engine->pollEvent(&event)) {
    		// la validación de coordenadas y el envio del evento al widget
    		// lo tiene que hacer el método
    		// this->activeWindow.processEvent(event);
    		x = event.getXCoordinate();
    		y = event.getYCoordinate();

    		if( (x > rect.x ) && ( x < rect.x + rect.w ) && ( y > rect.y ) && ( y < rect.y + rect.h ) ) {
    			button->handleEvent(event);
    			this->engine->drawSurface(button->getSurface(), button->getSurface()->getRectangle());
    			this->engine->refreshScreen();
    		}
			if (event.getType() == Quit){
				break; }
    	}
    }
    this->engine->stop();

}
*/
